import React from 'react'

interface PersonProps {
    name: string,
    content?: React.ReactNode
}
function Person(props: PersonProps) {
    return (
        <div>
            <h3>你好我是{props.name}</h3>
            {props.content}
        </div>
    )
}
const Animal:React.FunctionComponent<PersonProps> =(props)=>{
    return (
        <h2>我是动物</h2>
    )
}

function App() {
    return (
        <div>
            <h2>hello world</h2>
            <Person name='张三' content={<button>点我</button>} />
            <Animal name={'老虎'} />
        </div>
    )
}
export default App
